﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Nhapnghiepvukho.ascx.cs" Inherits="WebUserControl_Nhapnghiepvukho" %>
<style type="text/css">
    .style1
    {
        width: 100%;
    }
    .Madoigia
    { width :20%;}
    .Tendoigia
    {width :50%;}
    .giacudoigia
    {width :15%;}
    .giamoidoigia
    {width :15%;}
</style>
<script type="text/javascript">
     function pageLoad() {
      $("#<%= ibt_taomoi.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= ibt_luu.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
      $("#<%= ibt_xoa.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
         $("#<%= ibt_cancel.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
        
<table class="style1">
    <tr>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            <asp:ImageButton ID="ibt_taomoi" runat="server" Width="23px" 
                onclick="ibt_taomoi_Click" />
            <asp:ImageButton ID="ibt_luu" runat="server" Width="23px" 
                onclick="ibt_luu_Click" />
            <asp:ImageButton ID="ibt_xoa" runat="server" Width="23px" 
                onclick="ibt_xoa_Click" />
            <asp:ImageButton ID="ibt_cancel" runat="server" onclick="ibt_cancel_Click" 
                Width="23px" />
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label8" runat="server" Font-Names="Arial" Text="Loại nghiệp vụ"></asp:Label>
            <asp:DropDownList ID="dr_loainghiepvu" runat="server" AutoPostBack="True" 
                onselectedindexchanged="dr_loainghiepvu_SelectedIndexChanged" Width="200px">
            </asp:DropDownList>
            <asp:Label ID="Label9" runat="server" Font-Names="Arial" Text="Số nghiệp vụ"></asp:Label>
            <asp:DropDownList ID="dr_songhiepvu" runat="server" AutoPostBack="True" 
                onselectedindexchanged="dr_songhiepvu_SelectedIndexChanged" Width="200px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td>
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View2" runat="server">
                    <table class="style1">
                        <tr>
                            <td class="Madoigia">
                                <asp:Label ID="Label1" runat="server" Text="Mã"></asp:Label>
                            </td>
                            <td class ="Tendoigia">
                                <asp:Label ID="Label2" runat="server" Text="Tên"></asp:Label>
                            </td>
                            <td class ="giamoidoigia">
                                <asp:Label ID="Label3" runat="server" Text="Giá cũ"></asp:Label>
                            </td>
                            <td class ="giamoidoigia">
                                <asp:Label ID="Label4" runat="server" Text="Giá mới"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class ="Madoigia">
                                <asp:TextBox ID="tb_ma" runat="server" Width="70%"></asp:TextBox>
                            </td>
                            <td class ="Tendoigia">
                                <asp:TextBox ID="tb_ten" runat="server" ReadOnly="True" Width="70%"></asp:TextBox>
                            </td>
                            <td class ="giamoidoigia">
                                <asp:TextBox ID="tb_giacu" runat="server" ReadOnly="True" Width="50%"></asp:TextBox>
                            </td>
                            <td class ="giamoidoigia">
                                <asp:TextBox ID="tb_giamoi" runat="server" Width="50%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:GridView ID="gv_doigia" runat="server" AutoGenerateColumns="False">
                                    <Columns>
                                        <asp:BoundField DataField="itemkey" HeaderText="Mã">
                                            <HeaderStyle Width="20%" />
                                            <ItemStyle Width="20%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="description" HeaderText="Tên">
                                            <HeaderStyle Width="50%" />
                                            <ItemStyle Width="60%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="oldprice" HeaderText="Giá cũ">
                                            <HeaderStyle Width="15%" />
                                            <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="newprice" HeaderText="Giá mới">
                                            <HeaderStyle Width="15%" />
                                            <ItemStyle Width="15%" />
                                        </asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </asp:View>
                <asp:View ID="View1" runat="server">
                    <table class="style1">
                        <tr>
                            <td width="30%">
                                <asp:Label ID="Label5" runat="server" Text="Mã"></asp:Label>
                            </td>
                            <td width="50%">
                                <asp:Label ID="Label6" runat="server" Text="Tên"></asp:Label>
                            </td>
                            <td width="20%">
                                <asp:Label ID="Label7" runat="server" Text="Số lượng"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="30%">
                                <asp:TextBox ID="tb_ma1" runat="server" Width="50%"></asp:TextBox>
                            </td>
                            <td width="50%">
                                <asp:TextBox ID="tb_ten1" runat="server" ReadOnly="True" Width="50%"></asp:TextBox>
                            </td>
                            <td width="20%">
                                <asp:TextBox ID="tb_soluong" runat="server" Width="50%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:GridView ID="gv_nghiepvukho" runat="server" AutoGenerateColumns="False" 
                                    Width="988px">
                                    <Columns>
                                        <asp:BoundField DataField="itemkey" HeaderText="Mã">
                                            <HeaderStyle Width="30%" />
                                            <ItemStyle Width="30%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="description" HeaderText="Tên">
                                            <HeaderStyle Width="50%" />
                                            <ItemStyle Width="50%" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="qty" HeaderText="Số lượng">
                                            <HeaderStyle Width="20%" />
                                            <ItemStyle Width="20%" />
                                        </asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </asp:View>
            </asp:MultiView>
        </td>
    </tr>
</table>
